public class EatableTest {
    public static void main(String[] args) {
        Eatable[] eatables = new Eatable[3];//并非new接口 eatable只代表数组类型

        eatables[0] = new Chinese();        //多态性
        eatables[1] = new American();
        eatables[2] = new India();
        for (int i = 0; i < eatables.length; i++) {
            eatables[i].eat();
        }

    }
}
